home *** CD-ROM | disk | FTP | other *** search
/ IRIX Development Foundation 1.1 for IRIX 6.2 / SGI IRIX 6.2 Development Foundation 1.1.iso / dist / patchSG0002284.idb / usr / sbin / xfs_check.z / xfs_check
Text File  |  1998-04-03  |  441b  |  31 lines

  1. #!/bin/sh -f
  2. #ident "$Revision: 1.1 $"
  3.  
  4. OPTS=" "
  5. ISFILE=" "
  6. USAGE="usage: xfs_check [-svf] [-i ino]... special"
  7.  
  8.  
  9. while getopts "fi:sv" c
  10. do
  11.     case $c in
  12.     s)    OPTS=$OPTS"-s ";;
  13.     v)    OPTS=$OPTS"-v ";;
  14.     i)    OPTS=$OPTS"-i "$OPTARG" ";;
  15.     f)    ISFILE=" -f";;
  16.     \?)    echo $USAGE 1>&2
  17.         exit 2
  18.         ;;
  19.     esac
  20. done
  21. shift `expr $OPTIND - 1`
  22. case $# in
  23.     1)    xfs_db$ISFILE -r -c "check$OPTS" $1
  24.         status=$?
  25.         ;;
  26.     *)    echo $USAGE 1>&2
  27.         exit 2
  28.         ;;
  29. esac
  30. exit $status
  31.